﻿using System.Threading.Tasks;

namespace GMS.Utils
{
    public static class ObjectExtend
    {
        public static int ToInt32(this object obj)
        {
            string str = obj.ToString();
            return int.TryParse(str, out _) ? int.Parse(str) : 0;
        }
    }
}